#include<stdio.h>
#include<string>
#include <vector>
#include <iostream>
#include <fstream>
#include <dirent.h>
#include <QString>



namespace UsbEncrypt{
	using namespace std;
	class AuditFun{
		private:
            //void zipFolder(zipFile zip, const char *folder_path, const char *password);
            std::string usbPath;
		protected:
		public:
            bool isRemovableDrive(const QString &drivePath);
            AuditFun();
            AuditFun(QString drivePath);
			void MoveFilesToUSB(const std::vector<std::string> &filePaths, const std::string &usbPath);
			bool InitializeSQL();
			bool IfInitializeSQL();
			string getIp();
			string getMac();
			string getTime();
			bool insertAuditInfo();
			bool insertUseInfo(string file_name, string operate_type , string operate_time , string usb_id);
			bool PostAuditInfo();
			bool PostRegistInfo(string name,string worknum, int level,string user_number,string ip,string mac);
			void add_directory_to_zip(const char *zip_name, const char *password, const char *folder_path = "");
            bool deleteTableInfo();
            bool login(string username, string password);
            void getUsbId(string usbPath, stringstream& ss);
            bool postFileOperation(string filename, int operatetype);
            QString getConfigIpAddress();
            bool isUsbEnable();
	};
}
